package
{
	import com.maze.app.AppGlobal;
	import com.maze.game.control.Alert;
	import com.maze.game.view.MainView;
	
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.ui.ContextMenu;
	import flash.ui.ContextMenuItem;
	
	public class NextiveMaze extends Sprite
	{
		public function NextiveMaze()
		{
			if(stage!=null)
			{
				stage.align = StageAlign.TOP_LEFT;
				stage.scaleMode = StageScaleMode.NO_SCALE;
				stage.frameRate = 40;
			}
			init();
		}
		
		private function init():void
		{
			AppGlobal.init(stage);
			addMenuContextual();
			addChild(new MainView());
		}
		
		private function addMenuContextual():void
		{
			var mainMenu:ContextMenu = new ContextMenu();
			var itemVer:ContextMenuItem = new ContextMenuItem("AppVer: "+ AppGlobal.VERSION);
			mainMenu.hideBuiltInItems();
			mainMenu.customItems.push(itemVer);
			this.contextMenu = mainMenu;
		}
	}
}